package com.coin900.coin.server.fu.ctrl;

import com.coin900.coin.base.FuConstants;
import com.coin900.coin.server.BaseController;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;

/**
 * 页面跳转
 */
@Controller
public class FuJumpCtrl extends BaseController {

    //实名认证
    @RequestMapping(value = "/verify", method = RequestMethod.GET)
    public ModelAndView verify(String viewType,
                               HttpServletRequest request) {
        if (FuConstants.FU_PAGE.equals(viewType)) {
            ModelAndView modelAndView = super.buildView(request, "project/verify");
            return modelAndView;
        }
        return null;
    }

    //消息推送
    @RequestMapping(value = "/message", method = RequestMethod.GET)
    public ModelAndView message(String viewType,
                                HttpServletRequest request) {
        if (FuConstants.FU_PAGE.equals(viewType)) {
            ModelAndView modelAndView = super.buildView(request, "project/message");
            return modelAndView;
        }
        return null;
    }

    //详情
    @RequestMapping(value = "/detail", method = RequestMethod.GET)
    public ModelAndView detail(String viewType,
                               HttpServletRequest request) {
        if (FuConstants.FU_PAGE.equals(viewType)) {
            ModelAndView modelAndView = super.buildView(request, "project/detail");
            return modelAndView;
        }
        return null;
    }

    //关于我们
    @RequestMapping(value = "/aboutus", method = RequestMethod.GET)
    public ModelAndView about(String viewType,
                              HttpServletRequest request) {
        if (FuConstants.FU_PAGE.equals(viewType)) {
            ModelAndView modelAndView = super.buildView(request, "project/about");
            return modelAndView;
        }
        return null;
    }

    //全部记录
    @RequestMapping(value = "/record", method = RequestMethod.GET)
    public ModelAndView record(String viewType,
                               HttpServletRequest request) {
        if (FuConstants.FU_PAGE.equals(viewType)) {
            ModelAndView modelAndView = super.buildView(request, "project/record");
            return modelAndView;
        }
        return null;
    }
}
